﻿#include "tcpserver.h"
#include "common_log.h"

TCPServer::TCPServer(QObject *parent)
	: QTcpServer(parent)
{
}

TCPServer::~TCPServer()
{
}

bool TCPServer::StartServer(const unsigned int port, const QString& IP)
{
	if (!listen(QHostAddress::Any, port)) {
		log_error("Failed to start server:{}",errorString())
		return false;
	}
	log_info("Server started on port:{}", port);
	return true;
}


